#!/bin/bash

export LANG=en_US.UTF-8


pwd
work_path=$(dirname $0)
OUTPUT_APK_PATH="${work_path}/../output/android/output"

rm -rf ../output/

if [ ! -d ${OUTPUT_APK_PATH} ] ; then
  mkdir -pv ${OUTPUT_APK_PATH}
fi

echo $work_path

rm -rf ./.gradle/
rm -rf ./build/
rm -rf app/.gradle/
rm -rf app/build/
rm -rf app/.cxx/

./gradlew clean
./gradlew assembleRelease --no-daemon --no-parallel
cp app/build/outputs/apk/release/app-release.apk $OUTPUT_APK_PATH/POCDemo.apk


#if ! $local_build; then
#   echo "***** rm rtclibrary/libs *****"
#   rm -rf rtclibrary/libs
#fi
#
#cd ../../
#
#if [ -f output/android/output/Hermes.apk ] ;then
#  echo "Hermes.apk文件存在"
#else
#  exit 128
#fi


